package com.nightsoul.jmemcached.client1;

import net.spy.memcached.AddrUtil;
import net.spy.memcached.MemcachedClient;
import net.spy.memcached.internal.OperationFuture;

public class Client1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		MemcachedClient client = new MemcachedClient(AddrUtil.getAddresses("localhost:11211"));
		
		/**
		 * 设置该值多少秒后过期失效
		 */
		OperationFuture<Boolean> future = client.set("name", 10000, "lisi");
		System.out.println(future.get());
		
		client.shutdown();
	}

}
